package game;

import engine.ReEngine;

public class Game extends ReEngine
{
    
    public Game()
    {
        super();
    }
    
    private Player player;
    
    private Level level;
    
    protected void onStart()
    {
        this.configEngine.loadConfig("camera");
        this.player = new Player(this.configEngine.getConfig("camera"));
        
        this.level = new Level(this.player);
        this.setSceneTo(this.level.getScene());
    }
    
    protected void perLoop()
    {
        this.player.update();
        this.level.update(this.player);
    }
    
    protected void onClose()
    {
        this.player.destroy();
        this.level.destroy();
    }
    
}